delete from dbo.stdtabelasvar where tabela = 'TDU_Composicoes';
delete from dbo.stdcamposvar where tabela = 'TDU_Composicoes';
insert into dbo.stdtabelasvar values('TDU_Composicoes', 'ERP');
insert into dbo.stdcamposvar (tabela, campo, descricao, texto, visivel, ordem) 
values('TDU_Composicoes', 'CDU_Codigo', 'Codigo', 'Codigo', 1, 1);
insert into dbo.stdcamposvar (tabela, campo, descricao, texto, visivel, ordem) 
values('TDU_Composicoes', 'CDU_Descricao', 'Descricao', 'Descricao', 1, 2);
insert into dbo.stdcamposvar (tabela, campo, descricao, texto, visivel, ordem) 
values('TDU_Composicoes', 'CDU_Familia', 'Familia', 'Familia', 1, 3);
go


CREATE TABLE TDU_Composicoes(
	CDU_Codigo varchar(3) NOT NULL,
	CDU_Descricao varchar(50) NOT NULL,
	CDU_Familia varchar(10) NOT NULL,
 CONSTRAINT PK_TDU_Composicoes PRIMARY KEY CLUSTERED 
(
	CDU_Codigo ASC,
	CDU_Familia ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
go